<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width:100px;
            height:100px;
            background-color: red;
        }
    </style>
</head>
<body>

    <!-- <button class="show">显示</button>
    <button class="hide">隐藏</button>
    <div class="box"></div>
    <script src="script/jquery.js"></script>
    <script>
        // show 显示
        $(".show").click(function(){
            $(".box").show(500);
        })
        // hidden 逐渐消失 左上角
        $(".hide").click(function(){
            $(".box").hide(500);
        })
    </script>  -->

    <button class="fadeIn">显示</button>
    <button class="fadeOut">隐藏</button>
    <div class="box"></div>
    <script src="script/jquery.js"></script>
    <script>
        // fadeIn 逐渐显示
        $(".fadeIn").click(function(){
            $(".box").fadeIn(500);
        })
        // fadeOut 逐渐消失
        $(".fadeOut").click(function(){
            $(".box").fadeOut(500);
        })
    </script>
</body>
</html>